import { defineStore } from 'pinia'

export const useProductStore = defineStore('product', {
  state: () => ({
    categories: [],
    featured: [],
    byId: {},
  }),
  actions: {
    setCategories(list) {
      this.categories = list
    },
    setFeatured(list) {
      this.featured = list
    },
    setProduct(product) {
      this.byId[product.id] = product
    },
  },
})


